package br.com.salao.rest;

import java.util.Date;
import java.util.List;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import br.com.salao.bean.DateBusy;
import br.com.salao.model.DateBusyModel;

@Path("/datebusy")
public class DateBusyService {
	
	@GET
	@Path("/{idEstabelecimento}")	
	@Produces({MediaType.APPLICATION_JSON})
	public List<DateBusy> buscarDatasFechadasPorEstab(@PathParam("idEstabelecimento")int idEstabelecimento){	
		DateBusyModel busyModel = new DateBusyModel();
		return busyModel.buscarDatasFechadasPorEstab(idEstabelecimento);
	}
	
	@GET
	@Path("/{idEstabelecimento}/{dataFechada}")	
	@Produces({MediaType.APPLICATION_JSON})
	public List<DateBusy> buscarDateBusyPorEstabelecimentoEData(@PathParam("idEstabelecimento")int idEstabelecimento, @PathParam("dataFechada")Date dataFechada){
		DateBusyModel busyModel = new DateBusyModel();
		return busyModel.buscarDateBusyPorEstabelecimentoEData(idEstabelecimento, dataFechada);
	}
	
	

}
